package main

import (
	"encoding/json"
	"fmt"
)

/*
type Movie struct {
	Title    string
	Year     int
	Color    bool
	Actors   []string
	duration int
}
*/

type Movie struct {
	Title    string
	Year     int      `json:"release"`
	Color    bool     `json:"color"`
	Actors   []string `json:"actors"`
	duration int      `json:"duration"`
}

func main() {
	var m Movie
	b := `{"TITLe":"Casablanca","release":1942,"color":false,"actors":["Humphrey Bogart","Ingrid Bergman"],"duration":1900}`
	err := json.Unmarshal([]byte(b), &m)
	if err != nil {
		fmt.Printf("%v\n", err)
		return
	}
	fmt.Printf("%#v\n", m)
}
